<template>
	<div class="wrapper">
		<header>
			<p>个人资料</p>
		</header>
		
		<div class="basic">
			<p>基础信息</p>
		</div>
		
		<div class="infor">
			<div class="touxiang" @click="toAddTx">
				<p>头像</p>
				<img src="../assets/yh.webp">
			</div>
			<div class="zhanghao">
				<p>账号</p>
				<div class="zh">
					{{user.userId}}
				</div>
			</div>
			<div class="nicheng">
				<p>昵称</p>
				<div class="nc">
					{{user.userName}}
				</div>
			</div>
			<div class="address" @click="toUserAddress">
				<p>收货地址</p>
			</div>
		</div>
	</div>
</template>

<script>
	export default {
		name: 'personalData',
		data() {
			return {
				
				user: {},
				
			}
		},
		created(){
			this.user = this.$getSessionStorage('user');
			
		},
		methods: {
			toUserAddress() {
			    this.$router.push({ path: '/userAddress', query: { userId: this.userId } });
			},
			toAddTx() {
				this.$router.push({
					path: '/addTx'
				});
			},
		}
	}
</script>

<style scoped>
	.wrapper {
		width: 100%;
		height: 100%;
	}
	.wrapper header {
		width: 100%;
		height: 14vw;
		display: flex;
		justify-content: center;
		align-items: center;
	}
	.wrapper header p {
		font-size: 5vw;
		color: #000;
	}
	
	.wrapper .basic {
		width: 100%;
		height: 12vw;
		background-color: #EEEEEE;
		display: flex;
		justify-content: flex-start;
		align-items: center;
		border-bottom: solid 1px #DDD;
	}
	.wrapper .basic p {
		font-size: 5vw;
		color: #aaa;
		margin-left: 1vw;
		
	}
	.wrapper .infor {
		width: 100%;
		height: 48vw;
	}
	.wrapper .infor .touxiang {
		width: 100%;
		height: 12vw;
		display: flex;
		justify-content: space-between;
		align-items: center;
		border-bottom: solid 1px #DDD;
	}
	.wrapper .infor .touxiang p {
		font-size: 5vw;
		color: black;
		margin-left: 1vw;
	}
	.wrapper .infor .touxiang img {
		width: 9vw;
		height: 9vw;
		margin-right: 1vw;
	}
	.wrapper .infor .zhanghao {
		width: 100%;
		height: 12vw;
		display: flex;
		justify-content: space-between;
		align-items: center;
		border-bottom: solid 1px #DDD;
	}
	.wrapper .infor .zhanghao p{
		font-size: 5vw;
		color: black;
		margin-left: 1vw;
	}
	.wrapper .infor .zhanghao .zh {
		font-size: 3vw;
		color: #AAA;
		margin-right: 1vw;
	}
	.wrapper .infor .nicheng {
		width: 100%;
		height: 12vw;
		display: flex;
		justify-content: space-between;
		align-items: center;
		border-bottom: solid 1px #DDD;
	}
	.wrapper .infor .nicheng p {
		font-size: 5vw;
		color: black;
		margin-left: 1vw;
	}
	.wrapper .infor .nicheng .nc {
		font-size: 3vw;
		color: #AAA;
		margin-right: 1vw;
	}
	.wrapper .infor .address {
		width: 100%;
		height: 12vw;
		display: flex;
		justify-content: space-between;
		align-items: center;
		border-bottom: solid 1px #DDD;
	}
	.wrapper .infor .address p {
		font-size: 5vw;
		color: black;
		margin-left: 1vw;
	}
	
</style>
